import got from "got";
import { jsonpToJson } from "./util";
import { writeFileByType } from "./util";
const getCCTV = async () => {
    const url =
        "https://news.cctv.com/2019/07/gaiban/cmsdatainterface/page/news_1.jsonp?cb=news";
    const { body } = await got.get(url);
    const news = jsonpToJson(body).data.list;
    writeFileByType("cctv.news.list", news, 'json');
    return news;
};

export { getCCTV };
